﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Home.ascx.cs" Inherits="Sites_Vigor_Webparts_Pages_Home" %>
<%@ Register Src="../Common/RightNews.ascx" TagName="RightNews" TagPrefix="uc3" %>
<%@ Register Src="../Common/RightAds.ascx" TagName="RightAds" TagPrefix="uc4" %>
<%@ Register Src="../Common/RightWorkingTime.ascx" TagName="RightWorkingTime" TagPrefix="uc1" %>
<%@ Register Src="../Common/RightVideo.ascx" TagName="RightVideo" TagPrefix="uc2" %>
<%@ Import Namespace="NTTHAO.CommonWeb" %>
<%@ Import Namespace="NTTHAO.Web.BL.CommonPage" %>
<%@ Import Namespace="NTTHAO.Web.BL.HighlightLink" %>
<%@ Import Namespace="System.Data" %>
<div class="wrapper">
    <div style="clear: both;">
        <div class="bd-right">
            <uc1:RightWorkingTime ID="RightWorkingTime1" runat="server" />
            <uc2:RightVideo ID="RightVideo1" runat="server" />
        </div>
        <div class="bd-left">
            <div class="left-block">
                <div class="block-wrapper">
                    <h2 class="cat-title">
                        <span>GIỚI THIỆU</span>
                        <span class="sub-list">
                            <a href="/vi/gioi-thieu/su-menh-va-tam-nhin/" class="item">SỨ MỆNH VÀ TẦM NHÌN</a>
                            <a href="/vi/gioi-thieu/bac-si/" class="item">BÁC SĨ</a>
                            <a href="/vi/gioi-thieu/thiet-bi/" class="item">THIẾT BỊ</a>
                            <a href="/vi/gioi-thieu/khoa-phong/" class="item">KHOA PHÒNG</a>
                            <a href="/vi/gioi-thieu/nha-thuoc/" class="item">NHÀ THUỐC</a>
                            <a href="/vi/gioi-thieu/doi-tac/" class="item">ĐỐI TÁC</a>
                        </span>
                    </h2>
                    <div class="block-text-wrapper">
                    <%
                    if (_List1 != null)
                    {
                        string imagePath = "/" + Constant.UPLOAD_FILE_PATH + "commonpage/";
                        DataRow row = _List1.Rows[0];
                        int id = (int)row[CommonPageContent.ID__COLUMN_NAME];
                        int menuID = (int)row[CommonPageContent.MENUID__COLUMN_NAME];
                        string menuPath = row["MenuPath"].ToString() + CommonMenu.MENUPATH_SEPARATOR + menuID.ToString();
                        string header = row[CommonPageContent.HEADER__COLUMN_NAME].ToString();
                        string image = row[CommonPageContent.IMAGE__COLUMN_NAME].ToString();
                        string description = row[CommonPageContent.DESCRIPTION__COLUMN_NAME].ToString();
                        string urlHeader = row[CommonPageContent.URLHEADER__COLUMN_NAME].ToString();
                        string date = ((DateTime)row[CommonPageContent.INSERTDATE__COLUMN_NAME]).ToString("dd/MM/yyyy");
                        string href = this.GetContentUrl(menuPath, id, urlHeader);
                        %>
                        <div class="main-content">
                            <a class="image-border" href="<%=href %>"><img src="<%=imagePath + image %>" alt="<%=header.Replace("\"", "'") %>" title="<%=header.Replace("\"", "'") %>" /></a>
                            <h2 class="title"><a href="<%=href %>"><%=Server.HtmlEncode(header) %></a></h2>
                            <p class="description"><%=description %></p>
                            <a class="more" href="<%=href %>">XEM THÊM</a>
                        </div>
                        <div class="more-contents">
                            <ul class="detail-list-1">
                    <%
                        for (int i = 1; i < _List1.Rows.Count; i++)
                        {
                            row = _List1.Rows[i];
                            id = (int)row[CommonPageContent.ID__COLUMN_NAME];
                            menuID = (int)row[CommonPageContent.MENUID__COLUMN_NAME];
                            menuPath = row["MenuPath"].ToString() + CommonMenu.MENUPATH_SEPARATOR + menuID.ToString();
                            header = row[CommonPageContent.HEADER__COLUMN_NAME].ToString();
                            href = this.GetContentUrl(menuPath, id, urlHeader);
                    %>
                                <li><a href="<%=href %>"><%=Server.HtmlEncode(header) %></a></li>
                    <%
                        }
                    %>
                            </ul>
                    <%
                    } %>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
    <div style="clear: both;">
        <div class="bd-right">
            <uc3:RightNews ID="RightNews1" runat="server" />
            <uc4:RightAds ID="RightAds1" runat="server" />
        </div>
        <div class="bd-left">
            <div class="left-block">
                <div class="block-wrapper">
                    <h2 class="cat-title">
                        <span>GÓI KHÁM VIGOR HEALTH</span>
                        <span class="sub-list">
                            <a href="/vi/cac-goi-kham/" class="item">KHÁM NGOẠI VIỆN</a>
                            <a href="/vi/cac-goi-kham/" class="item">THẺ KHÁM SỨC KHỎE</a>
                            <a href="/vi/cac-goi-kham/" class="item">THẺ ƯU ĐÃI</a>
                            <a href="/vi/cac-goi-kham/" class="item">LIÊN KẾT BẢO HIỂM</a>
                        </span>
                    </h2>
                    <div class="block-text-wrapper">
                        <div class="main-content">
                            <a class="image-border" href="/vi/cac-goi-kham/goi-kham-doanh-nghiep/doanh-nghiep/"><img alt="Goi kham" src="<%=this._VirtualURL %>Resources/images/images/goi-kham.jpg" /></a>
                            <h2 class="title"><a href="/vi/cac-goi-kham/goi-kham-doanh-nghiep/doanh-nghiep/">Gói khám doanh nghiệp</a></h2>
                            <p class="description">Vigor HEALTH mang đến cho Quý Khách chuẩn chăm sóc y tế quốc tế cho người trong nước cũng như người nước ngoài.</p>
                            <a class="more" href="/vi/cac-goi-kham/goi-kham-doanh-nghiep/doanh-nghiep/">XEM THÊM</a>
                        </div>
                        <div class="more-contents more-contents-2">
                            <ul class="detail-list-2">
                                <li><a href="/vi/cac-goi-kham/goi-kham-doanh-nghiep/bao-hiem-y-te/">Gói khám bảo hiểm y tế</a></li>
                                <li><a href="/vi/cac-goi-kham/goi-kham-ca-nhan/tre-em/">Gói khám trẻ em</a></li>
                                <li><a href="/vi/cac-goi-kham/goi-kham-ca-nhan/nguoi-lon-tuoi/">Gói khám người lớn</a></li>
                                <li><a href="/vi/cac-goi-kham/goi-kham-ca-nhan/nam-gioi/">Gói khám nam giới</a></li>
                                <li><a href="/vi/cac-goi-kham/goi-kham-ca-nhan/nu-chua-ket-hon/">Gói khám nữ chưa kết hôn</a></li>
                                <li><a href="/vi/cac-goi-kham/goi-kham-ca-nhan/nu-da-ket-hon/">Gói khám nữ đã kết hôn</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <div class="left-block">
                <div class="block-wrapper">
                    <h2 class="cat-title"><span>CHUYÊN KHOA VIGOR HEALTH</span></h2>
                    <div class="block-text-wrapper">
                        <div class="main-content">
                            <a class="image-border" href="/vi/chuyen-khoa/noi-tong-quat/"><img alt="Chuyen khoa" src="<%=this._VirtualURL %>Resources/images/images/noi-tong-quat.jpg" /></a>
                            <h2 class="title"><a href="/vi/chuyen-khoa/noi-tong-quat/">Nội tổng quát</a></h2>
                            <p class="description">Vigor HEALTH mang đến cho Quý Khách chuẩn chăm sóc y tế quốc tế cho người trong nước cũng như người nước ngoài.</p>
                            <a class="more" href="/vi/chuyen-khoa/noi-tong-quat/">XEM THÊM</a>
                        </div>
                        <div class="more-contents more-contents-2">
                            <ul class="detail-list-3">
                                <li><a href="/vi/chuyen-khoa/ngoai-tong-quat/">Ngoại tổng quát</a></li>
                                <li><a href="/vi/chuyen-khoa/rang-ham-mat/">Răng hàm mặt</a></li>
                                <li><a href="/vi/chuyen-khoa/tai-mui-hong/">Tai mũi họng</a></li>
                                <li><a href="/vi/chuyen-khoa/chan-doan-hinh-anh/">Chẩn đoán hình ảnh</a></li>
                                <li><a href="/vi/chuyen-khoa/xet-nghiem/">Xét nghiệm</a></li>
                                <li><a href="/vi/chuyen-khoa/san-phu-khoa/">Sản phụ khoa</a></li>
                                <li><a href="/vi/chuyen-khoa/nhi-khoa/">Nhi khoa</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <div class="left-block">
                <div class="block-wrapper">
                    <h2 class="cat-title">HÌNH ẢNH VỀ VITOR HEALTH</h2>
                    <div class="block-image-wrapper main-image-wrapper"><% 
    HighlightLinkGroup hGroup = HighlightLinkGroup.GetItem(LanguageUtility.GetLanguageID() == 1 ? 3 : 4);
    if (hGroup != null && hGroup.Links.Count > 0)
    {
        string imagePath = "/" + NTTHAO.CommonWeb.Constant.UPLOAD_FILE_PATH + hGroup.ImagePath;
        int count = 0;
    %>
                        <div class="main-image-list"><%
        for (int i = 0; i < hGroup.Links.Count && (hGroup.MaxItemCount < 0 || count < hGroup.MaxItemCount); i++)
        {
            HighlightLink link = hGroup.Links[i];
            if (link.Activated) {
                count++;
    %>
                            <a class="main-image image-border" href="<%=link.Href %>" target="<%=link.Target %>" style="display: none;"><img alt="<%=Server.HtmlEncode(link.Title).Replace(Environment.NewLine, " ") %>" src="<%=imagePath + link.ImageName %>" /></a><%
            }
        }
    %>
                        </div>
                        <div class="main-image-thumbs"><%
        count = 0;
        for (int i = 0; i < hGroup.Links.Count && (hGroup.MaxItemCount < 0 || count < hGroup.MaxItemCount); i++)
        {
            HighlightLink link = hGroup.Links[i];
            if (link.Activated) {
                count++;
    %>
                            <a class="thumb-image image-border" href="<%=link.Href %>" target="<%=link.Target %>"><img alt="<%=Server.HtmlEncode(link.Title).Replace(Environment.NewLine, " ") %>" src="<%=imagePath + link.ThumbImageName %>" /></a><%
            }
        }
    %>
                        </div><%
    } %>
                    </div>
    <script type="text/javascript">
    jdoc.ready(function() {
        var mainImages = $('.main-image');
        var thumbImages = $('.thumb-image');
        
        thumbImages.hover(
            function(){
                var index = thumbImages.index(this);
                mainImages.css({display: 'none'});
                $(mainImages.get(index)).css({display: ''});
                
                thumbImages.removeClass('active');
                $(this).addClass('active');
            },
            function(){
            });
            
        thumbImages.first().mouseenter();
    });
    </script>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>
